package com.example.demo.controller;

import com.example.demo.dto.PageLimit;
import com.example.demo.server.BookServer;
import com.example.demo.vo.RestBean;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/book")
public class BookController {
    @Resource
    BookServer bookServer;

    @GetMapping("info")
    public RestBean selectAllBook(PageLimit pageLimit){
        return RestBean.success(bookServer.selectAllBook(pageLimit));
    }
}
